<template>
  <el-container>
    <el-aside width="200px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#337AB7"
          text-color="#fff"
          active-text-color="#F56C6C"
          :router="true"
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-user-solid"></i>
              <span>用户管理</span>
            </template>
            <el-menu-item index="/Address">地址管理</el-menu-item>
            <el-menu-item index="/shopCart">购物车管理</el-menu-item>
            <el-menu-item index="/Order">订单管理</el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-s-goods"></i>
              <span>商品管理</span>
            </template>
            <el-menu-item index="/Product">产品管理</el-menu-item>
            <el-menu-item index="/ProCategory">分类管理</el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-s-data"></i>
              <span>报表管理</span>
            </template>
            <el-menu-item index="/Screen">电商平台实时监控</el-menu-item>
            <el-menu-item index="/Seller">商家销量统计</el-menu-item>
            <el-menu-item index="/TrendPage">销量趋势统计</el-menu-item>
            <el-menu-item index="/StockPage">库存销量统计</el-menu-item>
            <el-menu-item index="/MapPage">商家地图分布</el-menu-item>
            <el-menu-item index="/RankPage">地区销售统计</el-menu-item>
            <el-menu-item index="/HotPage">热销商品统计</el-menu-item>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-collection"></i>
              <span>书籍审核</span>
            </template>
             <el-menu-item index="/BookManagement">书籍管理</el-menu-item>
            <el-menu-item index="/KeywordsBase">关键词管理</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>    
    <el-container>
      <el-header><h1>审核后台管理系统</h1></el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="less" scoped>
.el-container {
  height: 100%;
  width: 100%;
}

.el-header,
.el-footer {
  height: 100%;
  width: 100%;
  background-color: #409EFF;
  color: white;
  line-height: 20px;
}

.el-aside {
  height: 100%;
  width: 100%;
  background-color: #337AB7;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  height: 100%;
  width: 100%;
  background-color: #ECF5FF;
  color: #333;
  text-align: left;
  position: relative;
}
</style>
